const express = require('express')
const app = express()
const router = require('./router')

app.use('/home', router)

app.route('/book')
  .get(function(req, res) {
    res.send('Get a random book');
  })
  .post(function(req, res) {
    res.send('Add a book');
  })
  .put(function(req, res) {
    res.send('Update the book');
  });

app.listen(3000, () => {
  console.log('localhost:3000');
})
